//
//  RootTabViewController.m
//  NEWS_W_Y_S
//
//  Created by lanou3g on 15/10/14.
//  Copyright © 2015年 lanou3g.jake. All rights reserved.
//

#import "RootTabViewController.h"
#import "NewsViewController.h"
#import "ReadViewController.h"
#import "AudiovisualViewController.h"

@interface RootTabViewController ()

@end

@implementation RootTabViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self conFigViewControllers];
    
}



#pragma mark - 配置UITabBarController
- (void)conFigViewControllers
{
    NewsViewController *newsVC = [[NewsViewController alloc] init];
   // newsVC.view.backgroundColor = [UIColor redColor];
    UINavigationController *newsNav = [[UINavigationController alloc] initWithRootViewController:newsVC];
    newsVC.navigationItem.title = @"新闻";
    
    ReadViewController *readVC = [[ReadViewController alloc] init];
   // readVC.view.backgroundColor = [UIColor whiteColor];
    UINavigationController *readNav = [[UINavigationController alloc] initWithRootViewController:readVC];
    readVC.navigationItem.title = @"阅读";
    
    AudiovisualViewController *audioVC = [[AudiovisualViewController alloc] init];
  //  audioVC.view.backgroundColor = [UIColor blueColor];
    UINavigationController *audioNav = [[UINavigationController alloc] initWithRootViewController:audioVC];
    audioVC.navigationItem.title = @"视听";
    

    self.viewControllers = @[newsNav, readNav, audioNav];
    
    newsNav.tabBarItem.title = @"新闻";
    readNav.tabBarItem.title = @"阅读";
    audioNav.tabBarItem.title = @"视听";
    
    
    
    newsNav.tabBarItem.image = [[UIImage imageNamed:@"20150708072957725_easyicon_net_48"] imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)];
    
    readNav.tabBarItem.image = [[UIImage  imageNamed:@"20150723115812945_easyicon_net_32"] imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)];
    
    audioNav.tabBarItem.image = [[UIImage imageNamed:@"20150708073716644_easyicon_net_462"] imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)];
    
    
    // 默认选中
    self.selectedIndex = 2;
    
    self.tabBar.tintColor = [UIColor redColor];
   // self.tabBar.backgroundColor = [UIColor redColor];
}


@end
